package com.qys.livesMall.finance.enums;

import java.util.Objects;

public enum AmountIconEnum {

    IN("in","amount_icon/in.png"),
    OUT("out","amount_icon/out.png"),
    JH("jh","amount_icon/jh.png"),
    RE("re","amount_icon/re.png"),
    DH("dh","amount_icon/dh.png")
    ;

    private String type;

    private String url;

    AmountIconEnum(String type,String url){
        this.type=type;
        this.url=url;
    }

    public String getType() {
        return type;
    }

    public String getUrl() {
        return url;
    }

    public static String getUrl(String type){
        for(AmountIconEnum icon:AmountIconEnum.values()){
            if (Objects.equals(icon.getType(),type)){
                return icon.getUrl();
            }
        }
        return null;
    }
}
